#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import teachergrade_blueprint
from api_1_0.teacherGradeResource.teacherGradeResource import TeacherGradeResource
from api_1_0.teacherGradeResource.teacherGradeOtherResource import TeacherGradeOtherResource, TeacherGardeAddResource

api = Api(teachergrade_blueprint)

api.add_resource(TeacherGradeResource, '/teacherGrade/<evaluated_id>', '/teacherGrade', endpoint='TeacherGrade')


@teachergrade_blueprint.route('/teacherGrade/update/<evaluated_id>', methods=['PUT'], endpoint='TeacherGradeUpdate')
def update(evaluated_id):
    return TeacherGradeOtherResource.sensitive_update(evaluated_id)


# 添加教师端成绩信息
api.add_resource(TeacherGardeAddResource, '/teacherGrade/add', endpoint='add_teacherGrade')
